package com.zengfa.task.server.dao;

import java.util.List;

import com.zengfa.task.api.enums.JobStatus;
import com.zengfa.task.server.domain.entity.Job;

public interface JobDao {

	Job findJob(String jobGroup, String bizId);
	
	void save(Job job);
	
	Job getById(String jobId);
	
	void updateById(Job job);
	
	List<Job> listByStatus(JobStatus status);
	
	boolean updateByIdAndStatus(Job job, JobStatus beforeStatus);
	
	boolean lock(String jobId);
	
	void unLock(String jobId);
	
	void updSyncTime(Job job);
	
}
